A compiler translates (“compiles”) a computer program written in a high level programming source code (e.g., C++) into object code for execution by a computer processor. Source code often contains numerous loops, which are software structures that perform repeated operations using a single set of instructions. Typically, computer processors spend a majority of their time executing instructions within loops.
There is an ever present desire for improved methods and products to compile source code that offer improvements in computer processor execution time. Techniques to improve the execution time associated with processing instructions within loops include increasing instruction level parallelism. Software pipelining is one method of increasing instruction level parallelism. Software pipelining restructures loops of a computer program such that instructions from various iterations of a loop are executed by a computer processor in parallel (i.e., concurrently). This method typically results in significant improvements in execution time.
Many computer programs include loops that are contained within the body of other loop, i.e., loop nests. A loop nest may have an even greater impact on execution time than a single loop. A loop nest is typically processed by first software pipelining the innermost loop and, thus, software pipelined parallelism in outer loops, which could possibly offer greater instruction level parallelism, is largely ignored. Accordingly, there is a need for methods and products for processing loop nests that take advantage of instruction level parallelism for outer loops. The present invention addresses this need among others.